package com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeHistoricalRecordDateList;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.example.anew.journey.mynewjourney.R;
import com.example.anew.journey.mynewjourney.base.FirstChangeAllBaseActivity;
import com.example.anew.journey.mynewjourney.customview.MyRecyclerView;
import com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeHistoricalRecord.FirstChangeHistoricalRecordActivity;
import com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeHistoricalRecordDateList.persenter.FirstChangeHistoricalRecordDateListPersenter;
import com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeHistoricalRecordDateList.view.ISFirstChangeHistoricalRecordDateListView;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 杭州惟君医疗科技有限公司13
 * Created by 20433 on 2018/3/21
 *
 * @desc 东风山河绿，春已不折柳，繁花看不尽，处处惹人留
 * @desc 佛祖镇楼，bug辟容易
 */

public class FirstChangeHistoricalRecordDateListActivity extends FirstChangeAllBaseActivity implements ISFirstChangeHistoricalRecordDateListView {
    @Bind(R.id.no_date_picture)
    ImageView noDatePicture;
    @Bind(R.id.activity_first_change_historical_record_date_list_myrecyclerview)
    MyRecyclerView activityFirstChangeHistoricalRecordDateListMyrecyclerview;
    private View view;
    private FirstChangeHistoricalRecordDateListPersenter mFirstChangeHistoricalRecordDateListPersenter = new FirstChangeHistoricalRecordDateListPersenter(this);

    /**
     * @desc 主要内容的布局资源填充进来
     */
    @Override
    protected View setMainContentView() {
        view = View.inflate(this, R.layout.activity_first_change_historical_record_date_list, null);
        ButterKnife.bind(this, view);
        return view;
    }
    /**
     * @desc 初始化数据 onCreate()
     */
    @Override
    protected void initView(View view) {
        displayToolbar();
        displayReturn();
        displayTvName();
        displayIvShared();

        setToolbarBg(0xff2196F3);
        setReturnrePictuResources(R.mipmap.return_02);
        setTvNameEachAttribute(20, 0xffffffff, "历史记录");
        setIvSharedPictuResources(R.drawable.quxian);
        initdate();
    }

    private void initdate() {
        mFirstChangeHistoricalRecordDateListPersenter.initMyRecyclerView(activityFirstChangeHistoricalRecordDateListMyrecyclerview,this);
    }

    /**
     * @desc Activity 销毁 释放资源
     */

    @Override
    protected void releaseResources() {
        ButterKnife.unbind(view);
    }

    /**
     * @desc 网络监听 用于提示用户有网络了
     */
    @Override
    protected void promptHaveInternet() {

    }

    /**
     * @desc 网络监听 用于提示用户没有网络了
     */
    @Override
    protected void promptNoInternet() {

    }

    /**
     * @desc 点击分享按钮
     */
    @Override
    protected void onClickShared() {
        Intent intent = new Intent(FirstChangeHistoricalRecordDateListActivity.this, FirstChangeHistoricalRecordActivity.class);
        startActivity(intent);
    }

    /**
     * @desc 点击发布按钮
     */
    @Override
    protected void onClickRelease() {

    }

    /**
     * @desc 点击返回按钮
     */
    @Override
    protected void onClickReturn() {
        finish();
    }


    @Override
    public void showToastInformation(String str) {
        Toast.makeText(this,str,Toast.LENGTH_SHORT).show();
    }

    @Override
    public void displayProgress() {

    }

    @Override
    public void hiddenProgress() {

    }
}
